<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            height: 300px;
            width: 100%;
            border: 1px solid #000;
            transform: preserve-3d;
            /* 值越小,离我们近,值越大,离我们远 */
            perspective: 55px;
        }
        .inner{
            width: 100px;
            height: 100px;
            border: 1px solid #000;
            background-color: pink;
            transition: all 2s;
            /* 旋转 */
            /* transform: rotate(-90deg); */
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);

            /* 背面不可见 */
            /* backface-visibility: hidden; */
            /* 背面可见 */
            backface-visibility: visible;
        }
        .box:hover .inner{
            /* 默认旋转是Z轴 */
            transform: rotateX(120deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="inner"></div>
    </div>
</body>
</html>